package org.grow.util.controller;

import org.grow.util.service.CodeGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: xwg
 * @CreateDate: 2025/10/10
 */

@RequestMapping("/code")
@RestController
public class CodeController {

    @Autowired
    private CodeGenerator codeGenerator;
    @GetMapping("/next")
    public String next(String prefix){
        return codeGenerator.nextCode(prefix);
    }
}
